<?php
namespace Common\Model;

//自动生成代码
use Gy_Library\DBCont;
use phpDocumentor\Reflection\Types\Null_;

class VehicleNumberModel extends \Gy_Library\GyListModel{

    protected $_validate = array(
        array('number', 'require', '车辆型号必填',self::MUST_VALIDATE ,'',self::MODEL_BOTH),
        array('number','','车辆型号已经存在',self::EXISTS_VALIDATE,'unique',parent::MODEL_BOTH),
        array('number', '0,200', '车辆型号过长',self::VALUE_VALIDATE,'length', self::MODEL_BOTH),
        /********结束*********/
    );

    protected $_auto = array(
        array('create_date', 'time', parent::MODEL_INSERT, 'function'),
        array('update_date', 'time', parent::MODEL_UPDATE, 'function'),
        array('status', 'setStatus', parent::MODEL_UPDATE, 'callback'),
    );

    public function setStatus($v = 1){
        return $v;
    }
}